﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Common;
using System.Net;
using System.IO;
using System.Text;
using DAL;
using Model;
using CsharpHttpHelper;
namespace UI
{
    public partial class index : System.Web.UI.Page
    {
        public string url = HttpContext.Current.Request.Url.AbsoluteUri;
        protected void Page_Load(object sender, EventArgs e)
        {
            WeiXin wx = new WeiXin();
            //var xml = wx.PostInput(Request);
            //Commons.Log2(xml);

            //wx.HttpPost("http://www.kdxny84.cn/wxeaaac23155345f7b/message", "name=高波");

            //WebBrowserCrawler wb = new WebBrowserCrawler();
            //string linktext = wb.GetReult("http://mp.weixin.qq.com/s/ygGTg9SYPHlBRya9pgyCTw");
            //DAL.CommonDAL.UpdateColumnByID(94, "linktext", linktext, "active");
            //string link = "https://mp.weixin.qq.com/s/WrpSj9nI5NggVpD8fIrtsw";
            //HttpHelper http = new HttpHelper();
            //获取到网页数据
            //HttpResult result = http.GetHtml(new HttpItem()
            //{
                //URL = link,
                //Referer = link,
                //Allowautoredirect = true
            //});
            //string linktext = result.Html.Replace("data-src", "src");
            //Commons.DownImg(linktext);  


            /*
            WeiXin wx = new WeiXin();
            string xml = @"<xml>
                <AppId><![CDATA[wxef2c55ebada8928b]]></AppId>
                <Encrypt><![CDATA[]]></Encrypt>
            </xml>";


            string json = wx.XmlToJson(xml);
            dynamic obj = wx.ConvertJson(json);
            string appid = "";
            string encrypt = Tencent.Cryptography.AES_decrypt("CH2nNIQgfPjIZLTXdX8oq2dF/dRhzecCf/x0Te/hkmbRWB+i53miG7dXCxDqUA6GU9AO5ynmgQylo5Huo7nJP11KFFkRO5X+s58ywRjZuNjuwFMA/3F8vj9yF9RZMPygIseWu6bhPJd3iH+K9zRoKrYvdss6zYWcvpJoqMWifSx7h4jYrZGBreuL96BrN+Xn7bZ87hSTy7bdFcvUlT3xa7s/rt2b7M8FTcCjGt5k7VK3a3iN/dQlqw0CnNtgP3lumBr3qHu930a+kbJlc4Q93zmNM6G5t24/ubM4fogZeOWIKVZaR9ZO94Qbada8b/yDVOPAvtLfzFYZR1iBVpwMwAF86U1C/dKZT0KMcgDrr47GhKLSN5EU95smWnez6kbv8ymkswE72QP/lXy5NcVaVgiVOFLbIxZNhh01loHZIYd6OmswRusoWhr06lNofmRQGL6X+cFlctq/syTOAvhHKA==", "3E5y3Y8OFWSmHvkNJdANdXKJc6qH7hoygs6qNHpg3FB", ref appid);
            obj = wx.ConvertJson(wx.XmlToJson(encrypt));
            string bb = obj.ComponentVerifyTicket;
            //ConfigDAL.UpdateThirdTicket(obj.ComponentVerifyTicket);
            */

            //string a = DESEncrypt.Decrypt("D329439150F8CC00");
        }

        
    }
}